﻿/*
 * Сделано в SharpDevelop.
 * Пользователь: Кулик
 * Дата: 01.04.2011
 * Время: 15:16
 * 
 * Для изменения этого шаблона используйте Сервис | Настройка | Кодирование | Правка стандартных заголовков.
 */
using System;
using System.Collections.Generic;

namespace Video.Mov
{
//	/// <summary>
//	/// trak
//	/// </summary>
//	public class Track:Atom{
//		public TrackHeaderAtom trackHeaderAtom;
//		public ClippingAtom clippingAtom;
//		public TrackMatteAtom trackMatteAtom;
//		public EditAtom editAtom;
//		public TrackReferenceAtom trackReferenceAtom;
//		public TrackLoadSettingsAtom trackLoadSettingsAtom;
//		public TrackInputMapAtom trackInputMapAtom;
//		public MediaAtom mediaAtom;
//		public UserDataAtom userDataAtom;
//	}
	
	/// <summary>
	/// tkhd
	/// </summary>
	public class TrackHeaderAtom:Atom{
		public TrackHeaderAtom(Atom atom):base(atom){}
		//public byte Version;
		//public byte[] Flags = new byte[3];
		public uint CreationTime;
		public uint ModificationTime;
		public uint TrackID;
		public uint Reserved;
		public uint Duration;
		public ulong Reserved2;
		public ushort Layer;
		public ushort AlternateGroup;
		public ushort Volume;
		public ushort Reserved3;
		public byte[] MatrixStructure = new byte[36];
		public uint TrackWidth;
		public uint TrackHeight;
		
	}
	
//	/// <summary>
//	/// matt
//	/// </summary>
//	public struct TrackMatteAtom:Atom{
//		public CompressedMatteAtom compressedMatteAtom;
//	}
	
	/// <summary>
	/// kmat
	/// </summary>
	public class CompressedMatteAtom:Atom{
		//byte Version;
		//byte[] Flags = new byte[3];
		object MatteImageDescription;
		object MatteData;
	}
	
//	/// <summary>
//	/// edts
//	/// </summary>
//	public struct EditAtom:Atom{
//		public EditListAtom editListAtom;
//	}
	
	/// <summary>
	/// elst
	/// </summary>
	public class EditListAtom:Atom{
		public EditListAtom(Atom atom):base(atom){
			EditListTable = new List<EditListItem>();
		}
		//byte Version;
		//byte[] Flags = new byte[3];
		//int NumberOfEntries;
		public List<EditListItem> EditListTable;
	} 
	
	public class EditListItem{
		public uint TrackDuration;
		public uint MediaTime;
		public uint MediaRate;
	}
	
//	/// <summary>
//	/// tref
//	/// </summary>
//	public struct TrackReferenceAtom:Atom{
//		public List<TrackReferenceTypeAtom> trackReferenceTypeAtom;
//	}
	
	/// <summary>
	/// tmcd, chap, sync, acpt, ssrc
	/// </summary>
	public class TrackReferenceTypeAtom:Atom{
		public List<object> TrackIDs;
	}
	
	/// <summary>
	/// load
	/// </summary>
	public class TrackLoadSettingsAtom:Atom{
		int PreloadStartTime;
		int PreloadDuration;
		int PreloadFlags;
		int DefaultHints;
	}
	
//	/// <summary>
//	/// imap
//	/// </summary>
//	public struct TrackInputMapAtom:Atom{
//		public List<TrackInputAtom> trackInputAtom;
//	}
	
	/// <summary>
	///   in
	/// </summary>
	public class TrackInputAtom:Atom{
		int AtomID;
		short Reserved;
		short ChildCount;
		int Reserved2;
		InputTypeAtom inputTypeAtom;
		ObjectIDAtom objectIDAtom;
	} 
	
}
